﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true"
    CodeBehind="SupportEdit.aspx.cs" Inherits="Thuoc24h.AdminCP.Pages.SupportEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphContent" runat="server">
    <Telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="100%" Height="100%"
        ExpandMode="FullExpandedItem">
        <Items>
            <Telerik:RadPanelItem Text="Thêm / sửa Chát" Expanded="True">
                <ContentTemplate>
                    <div class="item">
                        <label>
                            Loại:</label><Telerik:RadComboBox runat="server" ID="ccSupportType" Width="350px">
                                <Items>
                                    <Telerik:RadComboBoxItem runat="server" Text="Skype" Value="1" />
                                    <Telerik:RadComboBoxItem runat="server" Text="Yahoo" Value="2" />
                                    <Telerik:RadComboBoxItem runat="server" Text="Điện thoại" Value="3" />
                                </Items>
                                <CollapseAnimation Duration="200" Type="OutQuint" />
                            </Telerik:RadComboBox>
                    </div>
                    <div class="item">
                        <label>
                            Giá trị:</label><Telerik:RadTextBox runat="server"
                                ID="txtName" Width="350px" />   (nick yahoo/ skype/ số điện thoại)                             
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Display="Dynamic" ForeColor="red"
                            ControlToValidate="txtName" runat="server" ErrorMessage="*" />
                    </div>
                    <%-- <div class="item">
                        <label>Điện thoại:</label><Telerik:RadTextBox runat="server" ID="txtPhoneNumber" Width="350px" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator21" Display="Dynamic" ForeColor="red" ControlToValidate="txtPhoneNumber" runat="server" ErrorMessage="*" />
                    </div>
                    <div class="item">
                        <label>Họ tên:</label><Telerik:RadTextBox runat="server" ID="txtFullname" Width="350px" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator12" Display="Dynamic" ForeColor="red" ControlToValidate="txtFullname" runat="server" ErrorMessage="*" />
                    </div>--%>
                    <div class="item" style="padding-bottom: 30px">
                        <label>
                        </label>
                        <Telerik:RadButton runat="server" ID="btnSave" OnClick="btnSave_OnClick">
                        </Telerik:RadButton>
                        <Telerik:RadButton ID="btnReset" runat="server" Text="Làm lại" OnClick="OnClick"
                            CausesValidation="False">
                        </Telerik:RadButton>
                    </div>
                    <Telerik:RadGrid runat="server" ID="gridData" CellSpacing="0" GridLines="None" Width="100%"
                        AutoGenerateColumns="False" AllowPaging="True" AllowCustomPaging="True" OnItemCommand="gridData_ItemCommand"
                        AllowSorting="True">
                        <MasterTableView ClientDataKeyNames="Id" DataKeyNames="Id" GroupLoadMode="Client"
                            PageSize="20" NoMasterRecordsText="Không có bản ghi nào.">
                            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                <HeaderStyle Width="20px"></HeaderStyle>
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                <HeaderStyle Width="20px"></HeaderStyle>
                            </ExpandCollapseColumn>
                            <GroupByExpressions>
                            </GroupByExpressions>
                            <Columns>
                                <Telerik:GridTemplateColumn HeaderText="STT" UniqueName="Id">
                                    <ItemStyle HorizontalAlign="Left" CssClass="center" />
                                    <ItemTemplate>
                                        <%#
                   (gridData.PageSize * (gridData.CurrentPageIndex + 1)) - gridData.PageSize + Container.ItemIndex + 1
                                        %>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="50px" />
                                </Telerik:GridTemplateColumn>
                                <Telerik:GridTemplateColumn HeaderText="Loại" UniqueName="Type">
                                    <ItemStyle HorizontalAlign="Left" CssClass="center" />
                                    <ItemTemplate>
                                        <%# GetType(Eval("Type"))%>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="100px" />
                                </Telerik:GridTemplateColumn>
                                <Telerik:GridTemplateColumn HeaderText="Giá trị" UniqueName="Data">
                                    <ItemStyle HorizontalAlign="Left" CssClass="center" />
                                    <ItemTemplate>
                                        <%#Eval("Data")%>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" />
                                </Telerik:GridTemplateColumn>
                                <%--<Telerik:GridTemplateColumn HeaderText="Họ tên" UniqueName="Data">
                                    <ItemStyle HorizontalAlign="Left" CssClass="center" Width="200px" />
                                    <ItemTemplate>
                                        <%#Eval("FullName")%>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" />
                                </Telerik:GridTemplateColumn>
                                <Telerik:GridTemplateColumn HeaderText="Điện thoại" UniqueName="PhoneNumber">
                                    <ItemStyle HorizontalAlign="Left" CssClass="center" Width="200px" />
                                    <ItemTemplate>
                                        <%#Eval("PhoneNumber")%>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" />
                                </Telerik:GridTemplateColumn>--%>
                                
                                <Telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Edit" ConfirmDialogType="RadWindow"
                                    HeaderText="Sửa" Text="Sửa" UniqueName="Edit">
                                    <ItemStyle CssClass="center" Width="32px" />
                                    <HeaderStyle HorizontalAlign="Center" Width="32px" Font-Bold="True" />
                                </Telerik:GridButtonColumn>
                                <Telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow"
                                    ConfirmText="Bạn có chắc chắn muốn xóa" ConfirmTitle="Xóa" HeaderText="X&#243;a"
                                    Text="X&#243;a" UniqueName="Delete">
                                    <ItemStyle CssClass="center" Width="32px" />
                                    <HeaderStyle HorizontalAlign="Center" Width="32px" Font-Bold="True" />
                                </Telerik:GridButtonColumn>
                            </Columns>
                            <EditFormSettings EditFormType="Template">
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>
                            </EditFormSettings>
                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="True">
                        </ClientSettings>
                        <FilterMenu EnableImageSprites="False">
                        </FilterMenu>
                        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                        </HeaderContextMenu>
                    </Telerik:RadGrid>
                </ContentTemplate>
            </Telerik:RadPanelItem>
        </Items>
    </Telerik:RadPanelBar>
</asp:Content>
